#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2018/1/30 9:49
# @Author  : maxinehehe
# @Site    : 
# @File    : urls.py
# @Software: PyCharm


from django.conf.urls import url,include

from .views import OrgView, AddUserAskView, OrgHomeView, OrgCourseView, OrgDescView, OrgTeacherView, AddFavView

from .views import TeacherListView, TeacherDetailView
# 可以 先写url 再写view
urlpatterns = [
    # 课程机构首页 列表页
    url(r'^list/$',OrgView.as_view() , name='org_list'),

    # modelform     # 再次解释as_view()的用法 类操作需要
    url(r'^add_ask/$', AddUserAskView.as_view(), name="add_ask"),
    # 课程机构 机构首页
    url(r'^home/(?P<org_id>\d+)/$', OrgHomeView.as_view(), name="org_home"),
    # 课程机构 机构课程
    url(r'^course/(?P<org_id>\d+)/$', OrgCourseView.as_view(), name="org_course"),
    # 课程机构 机构介绍
    url(r'^desc/(?P<org_id>\d+)/$', OrgDescView.as_view(), name="org_desc"),
    # 课程机构 机构讲师 nam便于更改
    url(r'^org_teacher/(?P<org_id>\d+)/$', OrgTeacherView.as_view(), name="org_teacher"),

    # 机构收藏
    url(r'^add_fav/$', AddFavView.as_view(), name="add_fav"),
    # 讲师列表页
    url(r'^teacher/list/$', TeacherListView.as_view(), name="teacher_list"),

    # 讲师详情页
    url(r'^teacher/detail/(?P<teacher_id>\d+)/$', TeacherDetailView.as_view(), name="teacher_detail"),
    ]